package reflect;

import java.lang.reflect.Field;

/**
 * @Author 郅占伟
 * @ClassName ReflectTest06
 * @Description: TODO
 * @Date 2023年12月01日
 * @Version: 1.0
 */
public class ReflectTest06 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class<?> aClass = Class.forName("common.class2");
        String simpleName = aClass.getSimpleName();
        Field[] declaredField = aClass.getDeclaredFields();

        for (int i = 0; i < declaredField.length; i++) {
            System.out.println(declaredField[i]);
        }

        System.out.println(simpleName);
    }
}
